package tiltmaze.solver;

import java.util.HashMap;
import java.util.HashSet;
import tiltmaze.RowCol;

/**
 * A vertex of an inverted motion graph.
 * @author Juraj Nižnan
 */
public class VertexInverted {

    RowCol position;
    HashMap<VertexInverted, HashSet<Integer>> sources = new HashMap<VertexInverted, HashSet<Integer>>();

    public VertexInverted(RowCol position) {
        this.position = position;
    }

    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        final VertexInverted other = (VertexInverted) obj;
        if (this.position != other.position && (this.position == null || !this.position.equals(other.position))) {
            return false;
        }
        return true;
    }

    @Override
    public int hashCode() {
        int hash = 3;
        hash = 71 * hash + (this.position != null ? this.position.hashCode() : 0);
        return hash;
    }



}
